#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:exercise2.py
# author:wmf
# datetime:2021/3/27 12:18
# software: PyCharm
'''
this is function description
'''
# import module your need

# 构造上述文件结构,分别在指定位置打开文件进行写入操作(同级文件夹里面打开;  同级目录下的子目录里面打开; 上一级文件目录中的其他文件夹中打开);

import os
with open('test.txt','r') as f:
    print(f.read())

path = os.getcwd()
# with open(path + '\\test1\\test.txt', 'r') as f:
with open(r'.\test1\test.txt', 'r') as f:
    print(f.read())

with open(r'..\list\test.txt','r') as f:
    print(f.read())